Applications of De Moivres theorem